<template>
    <div id='formPreview' class="formPreview"></div>
</template>

<script>
    export default {
        name: "FormPreview",
        mounted() {
            let json = this.$store.state.formJsonData;
            Formio.createForm(document.getElementById('formPreview'), json).then(function (form) {
                form.submission = {
                    data: {
                        'userName': '哈哈'
                    }
                };
            });
        }
    }
</script>

<style scoped>
    .formPreview {
        padding: 30px;
    }
</style>
